#pragma once
#include "afxwin.h"
#include "stdafx.h"

#include "BaseForm.h"

// CDlgParaSet dialog
//xxxx
//extern "C" 
 
class CDlgParaSet :  	public CBaseForm
{
	DECLARE_DYNAMIC(CDlgParaSet)

public:
	CDlgParaSet(CWnd* pParent = NULL);   // standard constructor
	virtual ~CDlgParaSet();

// Dialog Data
	enum { IDD = IDD_DLG_PARASET };

	static void* CreateShow( CWnd* pParent );

	virtual CString GetTitle() const;

HANDLE m_hthread;
protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	afx_msg LRESULT OnRMTRecv(WPARAM,LPARAM);
	DECLARE_MESSAGE_MAP()
public:
	virtual BOOL OnInitDialog();
	afx_msg void OnBnClickedBtnAdd();
public:
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnBnClickedBtnModify();
	afx_msg void OnBnClickedBtnDel();
	afx_msg void OnNMClickListPara(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnNMDblclkListPara(NMHDR *pNMHDR, LRESULT *pResult);
	
public:
	int x,oldx;
	int y;
	CListCtrl m_ListPara;
	order_future_param_item m_futureParaItem[30];
	order_future_param_item m_futureParaItemLocal[30];
	order_future_param_item m_futureParaItemTemp;
	int m_nCount;
	long m_nIndex;
	int m_nBtnFlg;
	
	CComboBox m_Comb_Strategy_Name;
	CComboBox m_Comb_Strategy_Type;
	CComboBox m_Comb_Code;
	CComboBox m_Comb_Buy_Type;
	CComboBox m_Comb_Sale_Type;
	float m_Edit_Buy_Slide;
	float m_Edit_Sale_Slide;
	int m_Edit_Strategy_nums;
	int m_Edit_Open_CancelTime;
	int m_Edit_Close_CancelTime;
	BOOL m_CheckMarketStatus;
	BOOL m_CheckMustOpen;

public:
	void ShowList();
	afx_msg void OnBnClickedBtnSet();
	CString m_strEditBranchNo;
	CString m_strEditCtpAccount;
	CString m_strEditCtpPassword;
	CString m_strEditProductInfo;
	CString m_strEditAuthCode;
	CString m_strStrategyExplain;
	CString m_strServerStatus;
	CString m_strServerStatus2;
	CString m_strMarketStatus;
	
	afx_msg void OnCbnSelchangeCombStrategyName();
	afx_msg void OnBnClickedBtnRefresh();
	afx_msg void OnBnClickedBtnLogin();
	afx_msg void OnBnClickedBtnLogout();
	afx_msg LRESULT OnThreadUpdate(WPARAM p1,LPARAM p2);
	
	afx_msg void OnClose();

	
	afx_msg void OnBnClickedButton3();

	virtual BOOL AllowClose();

	CButton m_btnLogin;
	
};
